<div class="requests view">
<h2><?php  __('Request');?></h2>
    <dl><?php $i = 0; $class = ' class="altrow"';?>
        <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class;?>>
            <?php echo $request['Request']['id']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Member'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class;?>>
            <?php echo $this->Html->link($request['Member']['name'], array('controller' => 'members', 'action' => 'view', $request['Member']['id'])); ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('For Month'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class;?>>
            <?php echo $request['Request']['for_month']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class;?>>
            <?php echo $request['Request']['created']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
        <dd<?php if ($i++ % 2 == 0) echo $class;?>>
            <?php echo $request['Request']['modified']; ?>
            &nbsp;
        </dd>
    </dl>
</div>
<div class="actions">
    <h3><?php __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('Edit Request', true), array('action' => 'edit', $request['Request']['id'])); ?> </li>
        <li><?php echo $this->Html->link(__('Delete Request', true), array('action' => 'delete', $request['Request']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $request['Request']['id'])); ?> </li>
        <li><?php echo $this->Html->link(__('List Requests', true), array('action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Request', true), array('action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Members', true), array('controller' => 'members', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Member', true), array('controller' => 'members', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Request Items', true), array('controller' => 'request_items', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Request Item', true), array('controller' => 'request_items', 'action' => 'add')); ?> </li>
    </ul>
</div>
<div class="related">
    <h3><?php __('Related Request Items');?></h3>
    <?php if (!empty($request['RequestItem'])):?>
    <table cellpadding = "0" cellspacing = "0">
    <tr>
        <th><?php __('Id'); ?></th>
        <th><?php __('Request Id'); ?></th>
        <th><?php __('Sub Category Id'); ?></th>
        <th><?php __('Description'); ?></th>
        <th><?php __('Created'); ?></th>
        <th><?php __('Modified'); ?></th>
        <th class="actions"><?php __('Actions');?></th>
    </tr>
    <?php
        $i = 0;
        foreach ($request['RequestItem'] as $requestItem):
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
        ?>
        <tr<?php echo $class;?>>
            <td><?php echo $requestItem['id'];?></td>
            <td><?php echo $requestItem['request_id'];?></td>
            <td><?php echo $requestItem['sub_category_id'];?></td>
            <td><?php echo $requestItem['description'];?></td>
            <td><?php echo $requestItem['created'];?></td>
            <td><?php echo $requestItem['modified'];?></td>
            <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'request_items', 'action' => 'view', $requestItem['id'])); ?>
                <?php echo $this->Html->link(__('Edit', true), array('controller' => 'request_items', 'action' => 'edit', $requestItem['id'])); ?>
                <?php echo $this->Html->link(__('Delete', true), array('controller' => 'request_items', 'action' => 'delete', $requestItem['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $requestItem['id'])); ?>
            </td>
        </tr>
    <?php endforeach; ?>
    </table>
<?php endif; ?>

    <div class="actions">
        <ul>
            <li><?php echo $this->Html->link(__('New Request Item', true), array('controller' => 'request_items', 'action' => 'add'));?> </li>
        </ul>
    </div>
</div>
